﻿<UserControl x:Class="MyHome.Configuration.Views.PluginConnectionView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Line X1="{Binding X1}" X2="{Binding X2}" Y1="{Binding Y1}" Y2="{Binding Y2}" StrokeThickness="2" MouseDown="Line_MouseDown" MouseUp="Line_MouseUp" MouseLeave="Line_MouseLeave" KeyUp="Line_KeyUp" Focusable="True">
            <Line.Style>
                <Style TargetType="{x:Type Line}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsSelected}"  Value="True">
                            <Setter Property="Stroke" Value="{DynamicResource {x:Static SystemColors.ActiveCaptionBrushKey}}"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsSelected}"  Value="False">
                            <Setter Property="Stroke" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Line.Style>
        </Line>
    </Grid>
</UserControl>
